7fa36c3db43b6d1a07990dd97f099e1a7a644908,cdap-hbase-compat-1.0-cdh5.5.0/src/main/java/co/cask/cdap/data2/transaction/queue/coprocessor/hbase10cdh550/HBaseQueueRegionObserver.java,HBaseQueueRegionObserver,preCompact,#ObserverContext#Store#InternalScanner#ScanType#CompactionRequest#,149

Before Change


    }

    LOG.info("preCompact, creates EvictionInternalScanner");
    ConsumerConfigCache consumerConfigCache = getConfigCache(e.getEnvironment());
    TransactionVisibilityState txVisibilityState = txStateCache.getLatestState();

    if (pruneEnable == null) {
      CConfiguration cConf = consumerConfigCache.getCConf();
      if (cConf != null) {
        pruneEnable = cConf.getBoolean(TxConstants.TransactionPruning.PRUNE_ENABLE,
                                       TxConstants.TransactionPruning.DEFAULT_PRUNE_ENABLE);
        if (Boolean.TRUE.equals(pruneEnable)) {
          String pruneTable = cConf.get(TxConstants.TransactionPruning.PRUNE_STATE_TABLE,
                                        TxConstants.TransactionPruning.DEFAULT_PRUNE_STATE_TABLE);
          long pruneFlushInterval = TimeUnit.SECONDS.toMillis(
            cConf.getLong(TxConstants.TransactionPruning.PRUNE_FLUSH_INTERVAL,
                          TxConstants.TransactionPruning.DEFAULT_PRUNE_FLUSH_INTERVAL));
          compactionState = new CompactionState(e.getEnvironment(), TableName.valueOf(pruneTable), pruneFlushInterval);
          LOG.debug("Automatic invalid list pruning is enabled. Compaction state will be recorded in table " +
                      pruneTable);
        }
      }
    }

    if (Boolean.TRUE.equals(pruneEnable)) {
      // Record tx state before the compaction
      compactionState.record(request, txVisibilityState);
    }

After Change


    LOG.info("preCompact, creates EvictionInternalScanner");
    TransactionVisibilityState txVisibilityState = txStateCache.getLatestState();

    reloadPruneState(e.getEnvironment());
    if (compactionState != null) {
      // Record tx state before the compaction
      compactionState.record(request, txVisibilityState);